import request from '@/utils/request'

// 查询岗位列表
export function listSyscolum(query) {
  return request({
    url: 'http://192.168.10.82:8080/zts/syscolum/list',
    method: 'get',
    params: query
  })
}

// 查询岗位详细
export function getPlan(planId) {
  return request({
    url: 'http://192.168.10.82:8080/zts/patrol/plan/get/' + planId,
    method: 'get'
  })
}
// 查询岗位详细
export function getPlanUserList(planId) {
  return request({
    url: 'http://192.168.10.82:8080//zts/patrol/plan/getPlanUserList?id=' + planId,
    method: 'get'
  })
}

// 新增岗位
export function addPlan(data) {
  return request({
    url: 'http://192.168.10.82:8080/zts/patrol/plan/add',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updatePlan(data) {
  return request({
    url: 'http://192.168.10.82:8080/zts/patrol/plan/edit',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delPlan(planId) {
  return request({
    url: 'http://192.168.10.82:8080/zts/patrol/plan/del?id=' + planId,
    method: 'delete'
  })
}

// 导出岗位
export function exportPlan(query) {
  return request({
    url: '/system/post/export',
    method: 'get',
    params: query
  })
}
